package com.arsn.myf.business.entity;

import com.arsn.myf.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 请假申请对象
 *
 * @author zhongrj
 * @date 2022-12-12 20:47:21
 */
@Data
@TableName("my_leave")
@ApiModel(value = "Leave对象", description = "Leave对象")
public class Leave extends BaseEntity implements Serializable{

    private static final long serialVersionUID = 1L;

    /**
    * 编号
    */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "编号")
    private Long id;

    /**
    * 流程定义主键
    */
    @ApiModelProperty(value = "流程定义主键")
    private String processDefinitionId;

    /**
    * 流程实例主键
    */
    @ApiModelProperty(value = "流程实例主键")
    private String processInstanceId;

    /**
    * 开始时间
    */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    /**
    * 结束时间
    */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    /**
    * 请假理由
    */
    @ApiModelProperty(value = "请假理由")
    private String reason;

    /**
    * 第一级审批人
    */
    @ApiModelProperty(value = "第一级审批人")
    private String taskUser;

    /**
    * 申请时间
    */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "申请时间")
    private Date applyTime;

    /**
    * 状态
    */
    @ApiModelProperty(value = "状态")
    private Integer status;

    /**
    * 是否已删除
    */
    @ApiModelProperty(value = "是否已删除")
    @TableLogic
    private Integer isDeleted;

}
